<%@ page pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<c:set var="ptn" value="######0.0000" />
<c:forEach items="${armItems}" var="aitem" varStatus="statu">



	<tr id='amp${gindex}'>
		<!-- 从左往右依次为 -->

		<!-- 编码 -->
		<td valign="bottom"><input type="hidden"		    
			name="bean.armItems[${gindex}].host.code" value="${aitem.host.code}" />
			${aitem.host.code}</td>

		<!-- 名称 -->
		<td valign="bottom">${aitem.host.name}</td>
		<fmt:formatNumber var="fav"
			value="${aitem.dataItems['ForwardStore'].atomValue}" pattern="${ptn}" />
		<td valign="bottom">${fav}</td>
		<fmt:formatNumber var="flv"
			value="${aitem.dataItems['ForwardStore'].accumulateValue}"
			pattern="${ptn}" />
		<td valign="bottom">${flv}</td>
		<td>${aitem.monthPlan }</td>
		<fmt:formatNumber var="aav"
			value="${aitem.dataItems['Action'].atomValue}" pattern="${ptn}" />
		<td valign="bottom"><input type="text" class="number-field"
			name="bean.armItems[${gindex}].dataItems['action'].atomValue"
			value="${aav}" /></td>
		<fmt:formatNumber var="alv"
			value="${aitem.dataItems['Action'].accumulateValue}" pattern="${ptn}" />
		<td valign="bottom">${alv}</td>

		<fmt:formatNumber var="pav"
			value="${aitem.dataItems['Passed'].atomValue}" pattern="${ptn}" />
		<td valign="bottom"><input class="number-field" type="text"
			name="bean.armItems[${gindex}].dataItems['passed'].atomValue"
			value="${pav}" /></td>
		<fmt:formatNumber var="plv"
			value="${aitem.dataItems['Passed'].accumulateValue}" pattern="${ptn}" />
		<td valign="bottom">${plv}</td>

		<!-- 废品 -->
		<fmt:formatNumber var="wav"
			value="${aitem.dataItems['Waster'].atomValue}" pattern="${ptn}" />
		<td valign="bottom"><input class="number-field" type="text"
			name="bean.armItems[${gindex}].dataItems['waster'].atomValue"
			value="${wav}" /></td>
		<fmt:formatNumber var="wlv"
			value="${aitem.dataItems['Waster'].accumulateValue}" pattern="${ptn}" />
		<td valign="bottom">${wlv}</td>
		<!--试销 -->
		<fmt:formatNumber var="tav"
			value="${aitem.dataItems['Test'].atomValue}" pattern="${ptn}" />
		<td valign="bottom"><input type="text" class="number-field"
			name="bean.armItems[${gindex}].dataItems['test'].atomValue"
			value="${tav}" /></td>
		<fmt:formatNumber var="tlv"
			value="${aitem.dataItems['Test'].accumulateValue}" pattern="${ptn}" />
		<td valign="bottom">${tlv}</td>
		<!-- 月末在产 -->

		<fmt:formatNumber var="flav"
			value="${aitem.dataItems['FinalStore'].atomValue}" pattern="${ptn}" />
		<td valign="bottom">${flav}</td>


		<!-- 备注 -->
		<td valign="bottom"><input class="number-field"
				name="bean.armItems[${gindex}].remark" value="${aitem.remark}" /> 
				</td>
		<td valign="bottom">
		    
		    <%
		    		    	org.jackysoft.entity.ProductType[] ptypes = org.jackysoft.entity.ProductType.values();
		    		    		    		     				 					pageContext.setAttribute("ptypes", ptypes);
		    		    %> 
 		<c:set var="myType" value="${aitem.itemType}"></c:set> 
 		<select
			name="bean.armItems[${gindex}].itemType" class="number-field">
				<c:forEach items="${ptypes}" var="pt">
					<option value="${pt}" ${myType==pt?"selected":""}>${pt}</option>
				</c:forEach>
		</select>
		    
		</td>

	</tr>
	<c:set var="gindex" value="${gindex+1}" scope="request" />
</c:forEach>